Use these objects to print existing reports previously created with db Reports from your program. Drag objects to your project as necessary.
This will give you two public methods:
PreviewReport(report as FolderItem, src as DB, where as String)
PrintReport(report as FolderItem, src as DB, where as String)
report - the report file to preview or print.
db Reports saves files as plain text files so you can included them as part of your report or save them to a database. When it is time to preview or print, simply create a temporary file with the contents of the report file or use an existing report file already on disk.
src - the data source.
db Reports assumes you already have your database open. The DB class is a db Reports base class for databases. If you are not using a REALDatabase or Valentina database, then you use this default class.
where - limiting information.
Any additional limitations on data will be added to those set with the report file.
Here is some sample code:
dim myDB as DB
dim myREALDB as REALDB
dim myvDB as ValentinaDB
myDB = new DB(myDatabase) // not REALDatabase
myREALDB = new REALDB(myDatabase) // is a REALDatabase
myvDB = new ValentinaDB(myvDatabase) // Valentina database